package com.java.exam;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ArrayListTests {
    public static void main(String[] args) {
        String[] str={"aa","bb","cc","dd","ee"};
        ArrayList arrayList=new ArrayList();
        arrayList.addAll(Arrays.asList(str));
        for(int i=0;i<arrayList.size();i++){
            arrayList.remove(i);
        }
        System.out.println(arrayList.size());
        doMethod01();
    }

    static void doMethod01(){
        //ArrayList<Integer> list1=new ArrayList<>(20);
        ArrayList<Integer> list2=new ArrayList<>();
        for(int i=0;i<50;i++){
            //list1.add(i);
             list2.add(i);
        }
    }

    static void doMethod02(){
        List list=new ArrayList();
        list.add(12.3f);
        list.add(32L);
        list.add(0,2);
        doAdd(list);
    }
    static void doAdd(List<? extends  Number> list){
        for(int i=1;i<=5;i++){
            //list.add(i);
        }

    }


}
